#include <windows.h>
#include <windowsx.h>
#include <cstdlib>
struct EZCTRL {
	const char* szClassName;
	const char* szWindowTitle;
	int exStyle;
	int iStyle;
	int x;
	int y;
	int w;
	int h;
	HMENU hMenu;
	HWND hwCtrl;
	HWND *hwAnotherName;
};

struct EZCTRLBASICINFO {
	HINSTANCE hInst;
	HWND hParent;
};

HWND EZCtrl(EZCTRL* CtrlGet,EZCTRLBASICINFO ebi) {
	EZCTRL Ctrl=*CtrlGet;
	HWND hwnd;
	hwnd=CreateWindowEx(Ctrl.exStyle,
	                    Ctrl.szClassName,Ctrl.szWindowTitle,Ctrl.iStyle|WS_CHILD|WS_VISIBLE,
	                    Ctrl.x,Ctrl.y,Ctrl.w,Ctrl.h,
	                    ebi.hParent,Ctrl.hMenu,ebi.hInst,NULL);

	CtrlGet->hwCtrl=hwnd;
	if(CtrlGet->hwAnotherName!=NULL)
		*CtrlGet->hwAnotherName=hwnd;

	return hwnd;
}
